#include<linux/init.h>
#include<linux/module.h>

// 1. 简单介绍

static int x = 11;


static char *book_name = "dissecting linux device driver";
module_param(book_name, charp,S_IRUGO);

static int __init hello_init(void){
    printk(KERN_INFO "hello world enter\n");
    printk(KERN_INFO "%d\n", x);
    printk(KERN_INFO "%s", book_name);
    return 0;
}

static void __exit hello_exit(void){
    printk(KERN_INFO "hello world exit\n");
}

module_init(hello_init);
module_exit(hello_exit);

MODULE_AUTHOR("shang chao");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("A simple hello world module");
MODULE_ALIAS("a simplest module");